package com.foreveross.taskservice.common.model;

import java.io.Serializable;
import java.text.SimpleDateFormat;
import java.util.Date;
/**
 * 执行动作+时间戳
 * @author Administrator
 *
 */
public abstract class AbstractAction implements Serializable{
	/**
	 * 
	 */
	private static final long serialVersionUID = 4837482443851857830L;
	protected static final String FORMAT1="yyyy-MM-dd HH:mm:ss:SSS";
	protected static final SimpleDateFormat SIMPLE_DATE_FORMAT1=new SimpleDateFormat(FORMAT1);
	
	private int actionType;
	private long timestamp;
	private String remark;
	private String timestampStr;
	
	
	public AbstractAction(int actionType, long timestamp, String remark) {
		super();
		this.actionType = actionType;
		this.timestamp = timestamp;
		this.remark = remark;
		this.timestampStr=SIMPLE_DATE_FORMAT1.format(new Date(timestamp));
	}
	
	public AbstractAction(int actionType, long timestamp) {
		super();
		this.actionType = actionType;
		this.timestamp = timestamp;
		this.timestampStr=SIMPLE_DATE_FORMAT1.format(new Date(timestamp));
	}
	
	public AbstractAction(int actionType, String timestampStr, String remark){
		super();
		this.actionType = actionType;
		this.timestampStr = timestampStr;
		this.remark = remark;
	}

	public int getActionType() {
		return actionType;
	}

	public long getTimestamp() {
		return timestamp;
	}

	public String getRemark() {
		return remark;
	}

	public void setActionType(int actionType) {
		this.actionType = actionType;
	}

	public void setTimestamp(long timestamp) {
		this.timestamp = timestamp;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public String getTimestampStr() {
		return timestampStr;
	}
	
	
}
